From a7e2fb1d6bc1467b2125ddeb1f750f6c9087105f Mon Sep 17 00:00:00 2001 From: alexmot Date: Fri, 11 Nov 2005 20:44:20 +0000 Subject: [PATCH] correct zero NMEA lat/lon on input git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1578 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/csv_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpsbabel/csv_util.c b/gpsbabel/csv_util.c index 6bfbfc786..a4e78e759 100644 --- a/gpsbabel/csv_util.c +++ b/gpsbabel/csv_util.c @@ -802,7 +802,7 @@ xcsv_parse_val(const char *s, waypoint *wpt, const field_map_t *fmp) human_to_dec( s, &wpt->latitude, &wpt->longitude, 1 ); } else if ( strcmp(fmp->key, "LAT_NMEA") == 0) { - wpt->latitude = ddmm2degrees(wpt->latitude); + wpt->latitude = ddmm2degrees(atof(s)); } else /* LONGITUDE CONVERSIONS ***********************************************/ if (strcmp(fmp->key, "LON_DECIMAL") == 0) { @@ -822,7 +822,7 @@ xcsv_parse_val(const char *s, waypoint *wpt, const field_map_t *fmp) human_to_dec( s, &wpt->latitude, &wpt->longitude, 2 ); } else if ( strcmp(fmp->key, "LON_NMEA") == 0) { - wpt->latitude = ddmm2degrees(wpt->longitude); + wpt->longitude = ddmm2degrees(atof(s)); } else /* LAT AND LON CONVERSIONS ********************************************/ if ( strcmp(fmp->key, "LATLON_HUMAN_READABLE") == 0) { -- 2.30.2